import { Router } from 'express';
import {UpLoad, FILE} from '~/utils';
import reimbursementRouter from './reimbursement';
import zxwmsRouter from './zxwms';

const router = Router();

router.post('/userPhoto', UpLoad.single('userPhoto'), function (req, res, next) {
  FILE.remove('/image/userPhoto/' + req.query.imageOldName);
  res.send({
    filename: req.file.filename,
  });
});
router.use('/reimbursement', reimbursementRouter);
router.use('/zxwms', zxwmsRouter);

export default router;
